<template>
  <div class="dialog-container">
    <div class="close">
      <div class="closeBtn" @click="onClose">×</div>
    </div>

    <div class="title">
      <span>{{ title }}</span>
    </div>
    <div class="spitline"></div>
    <slot name="content"> </slot>
    <slot name="footer"> </slot>
  </div>
</template>

<script setup>
import { defineProps, ref } from 'vue'
defineProps({
  title: {
    type: String,
    default: 'cesium弹窗'
  }
})

const onClose = () => {
  const dialogElement = document.getElementById('dialogContainer')
  dialogElement.remove()
}
</script>

<style lang="scss" scoped>
.dialog-container {
  width: 100%;
  height: 100%;
  background: rgba(16, 24, 61, 1);
  border: 1px solid #1079db;
  box-shadow: 2px 3px 10px 0px rgba(0, 0, 0, 0.7);
  position: relative;
  .close {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-top: 7px;
    .closeBtn {
      width: 17px;
      height: 17px;
      background: rgba(21, 152, 243, 1);
      font-size: 20px;
      font-family: Microsoft YaHei;
      color: rgba(0, 0, 0, 0.8);
      line-height: 14px;
      margin-right: 8px;
      cursor: pointer;
    }
  }
  .title {
    height: 28px;
    width: 400px;
    // background: url('../images/item_title_bg.png') no-repeat;
    // background: rgba(255, 0, 0, 0.3);
    // background-size: contain;
    margin-right: 36px;
    line-height: 15px;
    > span {
      font-size: 20px;
      font-family: Microsoft YaHei;
      font-style: italic;
      color: #ffffff;
      background: linear-gradient(0deg, #99a0ad 0%, #fbfdff 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      padding-left: 15px;
      padding-bottom: 10px;
    }
  }

  .spitline {
    // float: right;
    width: 100%;
    height: 1px;

    background: #ffffff;
    position: relative;
    opacity: 0.6;
    // text-align: center;
  }
}
</style>
